home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / uhren & terminkalender / organizer / timeevent_1.1 / install / installer.script < prev   
Text File  |  1996-04-07  |  10KB  |  457 lines

  1. (set thisver 1)
  2. (set thisrev 1)
  3.  
  4. (procedure setlanguage
  5. (
  6.  
  7. ; english strings
  8. ;
  9. (if (= @language "english")
  10. (
  11.  
  12. (set #CheckInst
  13. (cat "Checking Installationfiles"
  14. ))
  15.  
  16. (set #NoTE
  17. (cat "The TimeEvent executeable can't be found. "
  18.      "A installation without the program makes no sense. "
  19.      "Try to get the original archive of TimeEvent %ld.%ld"
  20. ))
  21.  
  22. (set #MissingFiles
  23. (cat "There are missing files in the archive.\n"
  24.      "This are the files that couldn't be found:\n\n" 
  25. ))
  26.  
  27. (set #AskContinue
  28. (cat "\nContinue with installation?"
  29. ))
  30.  
  31. (set #AskOldTE
  32. (cat "There is another copy of TimeEvent in this directory.\n\n"
  33. ))
  34.  
  35. (set #ThisVer
  36. (cat "This Version : %ld.%ld\n"
  37. ))
  38.  
  39. (set #OtherVer
  40. (cat "Version in %s : %ld.%ld\n\n"
  41. ))
  42.  
  43. (set #AskOverwrite
  44. (cat "Overwrite version in %s?"
  45. ))
  46.  
  47. (set #CopyTE
  48. (cat "Copy TimeEvent"
  49. ))
  50.  
  51. (set #AskDocDir
  52. (cat "Where should I install the Documentation?"
  53. ))
  54.  
  55. (set #CopyDoc
  56. (cat "Copy Document"
  57. ))
  58.  
  59. (set #AskLocaleDir
  60. (cat "Where should I install the english catalog file?"
  61. ))
  62.  
  63. (set #CopyCatalog
  64. (cat "Copy language catalog"
  65. ))
  66.  
  67. (set #AskEnvCp
  68. (cat ("With version %ld.%ld" thisver thisrev) " of TimeEvent the TimeEvent.prefs file moved from "
  69.      "ENVARC:Sys (ENV:Sys) to ENVARC: (ENV:). Should I move your old TimeEvent.prefs file "
  70.      "to the new location?"
  71. ))
  72.  
  73. (set #CopyEnv
  74. (cat "Moving old TimeEvent.prefs"
  75. ))
  76.    
  77. (set #AskSCp
  78. (cat "There exists a crontab in S:. Should I use its contents for TimeEvent?"
  79. ))
  80.  
  81. (set #CopyS
  82. (cat "Moving crontab"
  83. )) 
  84.  
  85. (set #AskDelS
  86. (cat "Remove S:crontab?"
  87. ))
  88.  
  89. (set #AskCC
  90. (cat "Do you use the program CyberCron?"
  91. ))
  92.  
  93. (set #AskModify
  94. (cat "Should I add the tooltype\n\n"
  95.      "CRONTAB=ENV:TimeEvents.prefs\n\n"
  96.      "in the CyberCron icon?"
  97. ))
  98.  
  99. (set #AskCCfile
  100. (cat "Please select the CyberCron executeable"
  101. ))
  102.  
  103. (set #NoCC
  104. (cat "You have to setup your Cron program, so that it uses the file\n\n"
  105.      "ENV:TimeEvent.prefs\n\n"
  106.      "as the CronTab. Read the manual to your Cron program to see how this "
  107.      "can be achieved. Refer also to the chapter in the TimeEvent "
  108.      "documentation, which regards to that topic."
  109. ))
  110.  
  111. (set #NoToolType
  112. (cat "If you execute CyberCron from the User-Startup script, you have to "
  113.      "add\n\n"
  114.      "CRONTAB=ENV:TimeEvent.prefs\n\n"
  115.      "to the call. You can find more details about the possible cli options "
  116.      'in the CyberCron documentation (chapter "Starting CyberCron"). '
  117.      "Read also the specific chapter in the TimeEvent documentation."
  118. ))
  119.  
  120. )) ; end english strings
  121.  
  122. ; deutsche strings
  123. ;
  124. (if (= @language "deutsch")
  125. (
  126.  
  127. (set #CheckInst 
  128. (cat "Überprüfe Installationsdateien"
  129. ))
  130.  
  131. (set #NoTE
  132. (cat "Das Programm TimeEvent kann nicht gefunden werden. "
  133.      "Ohne dieses macht eine Installation wohl wenig Sinn, oder? "
  134.      "Versuchen Sie das Originalarchiv von TimeEvent %ld.%ld zu bekommen."
  135. ))
  136.  
  137. (set #MissingFiles
  138. (cat "Das Installationsarchiv ist unvollständig.\n"
  139.      "Die folgenden Dateien konnten nicht gefunden werden:\n\n" 
  140. ))
  141.  
  142. (set #AskContinue
  143. (cat "\nWeitermachen mit der Installation?"
  144. ))
  145.  
  146. (set #AskTEDir
  147. (cat "In welchem Verzeichnis soll TimeEvent installiert werden?"
  148. ))
  149.  
  150. (set #AskOldTE
  151. (cat "In diesem Verzeichnis existiert schon eine Kopie von TimeEvent.\n\n"
  152. ))
  153.  
  154. (set #ThisVer
  155. (cat "Diese Version : %ld.%ld\n"
  156. ))
  157.  
  158. (set #OtherVer
  159. (cat "Version in %s : %ld.%ld\n\n"
  160. ))
  161.  
  162. (set #AskOverwrite
  163. (cat "Version in %s überschreiben?"
  164. ))
  165.  
  166. (set #CopyTE
  167. (cat "Kopiere TimeEvent"
  168. ))
  169.  
  170. (set #AskDocDir
  171. (cat "In welches Verzeichnis soll die Dokumentation kopiert werden?"
  172. ))
  173.  
  174. (set #CopyDoc
  175. (cat "Kopiere Dokumentation"
  176. ))
  177.  
  178. (set #AskLocaleDir
  179. (cat "In welches Verzeichnis soll die deutsche Sprachdatei kopiert werden?"
  180. ))
  181.  
  182. (set #CopyCatalog
  183. (cat "Kopiere Sprachdatei"
  184. ))
  185.  
  186. (set #AskEnvCp
  187. (cat ("Ab der Version %ld.%ld" thisver thisrev) " liegt die Datei TimeEvent.prefs in "
  188.      "ENVARC: (ENV:) anstatt in ENVARC:Sys (ENV:Sys). Soll die alte TimeEvent.prefs "
  189.      "Datei in diese Verzeichnisse geschoben werden?"
  190. ))
  191.  
  192. (set #CopyEnv
  193. (cat "Verschiebe alte TimeEvent.prefs Datei"
  194. ))
  195.    
  196. (set #AskSCp
  197. (cat "Es existiert eine Datei S:crontab. Soll deren Inhalt für TimeEvent übernommen "
  198.      "werden?"
  199. ))
  200.  
  201. (set #CopyS
  202. (cat "Verschibe crontab"
  203. )) 
  204.  
  205. (set #AskDelS
  206. (cat "S:crontab löschen?"
  207. ))
  208.  
  209. (set #AskCC
  210. (cat "Benutzen Sie das Programm CyberCron?"
  211. ))
  212.  
  213. (set #AskModify
  214. (cat "Soll im CyberCron Pictogramm das Merkmal\n\n"
  215.      "CRONTAB=ENV:TimeEvents.prefs\n\n"
  216.      "eingetragen werden?"
  217. ))
  218.  
  219. (set #AskCCfile
  220. (cat "Bitte wählen Sie das CyberCron Program aus"
  221. ))
  222.  
  223. (set #NoCC
  224. (cat "Sie müssen ihr Cron Programm so aufrufen, daß dieses die Datei\n\n"
  225.      "ENV:TimeEvent.prefs\n\n"
  226.      "als CronTab verwendet. In der Dokumentation zu diesem Programm "
  227.      "sollte ersichtlich sein, wie dies zu erreichen ist. Lesen dazu auch "
  228.      "das ensprechende Kapitel in der Dokumentation zu TimeEvent."
  229. ))
  230.  
  231. (set #NoToolType
  232. (cat "Falls Sie CyberCron aus dem User-Startup Skript starten, müssen "
  233.      "Sie den Parameter\n\n"
  234.      "CRONTAB=ENV:TimeEvent.prefs\n\n"
  235.      "beim Aufruf ergänzen. Weitere Einzelheiten zu den möglichen "
  236.      "Aufrufparametern erfahren Sie in der Dokumentation zu CyberCron "
  237.      '(Kapitel "Starting CyberCron"). '
  238.      "Lesen Sie dazu auch das ensprechende Kapitel in der Dokumentation "
  239.      "zu TimeEvent."
  240. ))
  241.  
  242. )) ; ende deutsche strings
  243.  
  244. )) ; end of proc
  245.  
  246. (procedure checkfiles 
  247.    (
  248.       (working #CheckInst)
  249.       (if (NOT (exists "/Prefs/TimeEvent"))
  250.          (abort (#NoTE thisver thisrev))
  251.       )
  252.       (set n 0)
  253.       (while (set thisfile (select n "/Prefs/TimeEvent.info"
  254.                                      (cat "/Doc/" @language ".guide")
  255.                                      (cat "/Doc/" @language ".guide.info")
  256.                                      "/README"
  257.                                      "/README.info"
  258.                                      ""))
  259.          (
  260.             (set n (+ n 1))
  261.             (if (NOT (exists thisfile))
  262.                (set missing (cat missing thisfile "\n"))
  263.             )
  264.          )
  265.       )
  266.       
  267.       (if (<> missing <NIL>)
  268.          (if 
  269.             (askbool
  270.                (prompt #MissingFiles missing #AskContinue)
  271.                (help @askbool-help)
  272.                (default 0)
  273.             )
  274.             (set n 0)
  275.             (exit (quiet))
  276.          )
  277.       )
  278.    )
  279. )
  280.  
  281. (user 2)
  282. (setlanguage)
  283. (checkfiles)
  284. (user 1)
  285. (welcome)
  286.  
  287. (set destdir
  288.    (askdir 
  289.       (prompt #AskTEDir)
  290.       (help @askdir-help)
  291.       (default "Workbench:Prefs")
  292.    )
  293. )
  294.  
  295. (set @default-dest destdir)
  296.  
  297. (if 
  298.    (exists (cat @default-dest "/TimeEvent") (noreq))
  299.    (
  300.       (set vernum (getversion (cat @default-dest "/TimeEvent")))
  301.       (set ver (/ vernum 65536))
  302.       (set rev (- vernum (* ver 65536)))
  303.          (if
  304.             (askbool 
  305.                (prompt #AskOldTE (#ThisVer thisver thisrev) (#OtherVer @default-dest ver rev)
  306.                        (#AskOverwrite @default-dest))
  307.                (help @askbool-help)
  308.                (default 0)
  309.             )
  310.             (set n 0)
  311.             (exit (quiet))
  312.          )
  313.    )
  314. )
  315.  
  316. (copyfiles
  317.    (prompt #CopyTE)
  318.    (help @copyfiles-help)
  319.    (source "/Prefs/TimeEvent")
  320.    (dest @default-dest)
  321.    (infos)
  322.    (optional force askuser)
  323. )
  324.  
  325. (set docdir
  326.    (askdir 
  327.       (prompt #AskDocDir)
  328.       (help @askdir-help)
  329.       (default "Workbench:Prefs")
  330.    )
  331. )
  332.  
  333. (copyfiles
  334.    (prompt #CopyDoc)
  335.    (help @copyfiles-help)
  336.    (source (cat "/Doc/" @language ".guide"))
  337.    (newname "TimeEvent.guide")
  338.    (dest docdir)
  339.    (infos)
  340.    (optional force askuser)
  341. )
  342.  
  343. (if 
  344.    (NOT (= @language "english"))
  345.    (
  346.       (set localedir
  347.          (askdir 
  348.             (prompt #AskLocaleDir)
  349.             (help @askdir-help)
  350.             (default (cat "LOCALE:Catalogs/" @language))
  351.          )
  352.       )
  353.       (copyfiles
  354.          (prompt #CopyCatalog)
  355.          (help @copyfiles-help)
  356.          (source (cat "/Catalogs/" @language "/TimeEvent.catalog"))
  357.          (dest localedir)
  358.          (infos)
  359.          (optional force askuser)
  360.       )
  361.    )
  362. )
  363.  
  364. (if
  365.    (exists ("ENVARC:Sys/TimeEvent.prefs") (noreq))
  366.       (if
  367.          (askbool
  368.             (prompt #AskEnvCp)
  369.             (help @askbool-help)
  370.             (default 1)
  371.          )
  372.          (
  373.             (copyfiles
  374.                (prompt #CopyEnv)
  375.                (help @copyfiles-help)
  376.                (infos)
  377.                (optional force askuser)
  378.                (source "ENVARC:Sys/TimeEvent.prefs")
  379.                (dest "ENVARC:")
  380.                (optional nofail force askuser)
  381.             )
  382.             (copyfiles
  383.                (prompt #CopyEnv)
  384.                (help @copyfiles-help)
  385.                (infos)
  386.                (optional nofail force askuser)
  387.                (source "ENV:Sys/TimeEvent.prefs")
  388.                (dest "ENV:")
  389.             )
  390.             (delete "ENVARC:Sys/TimeEvent.prefs" (optional force askuser))
  391.             (delete "ENV:Sys/TimeEvent.prefs" (optional force askuser))
  392.          )
  393.       )
  394.       (if
  395.          (exists ("S:crontab") (noreq))
  396.          (if
  397.             (askbool
  398.             (prompt #AskSCp)
  399.             (help @askbool-help)
  400.             (default 1)
  401.          )
  402.          (
  403.             (copyfiles
  404.                (prompt #CopyS)
  405.                (help @copyfiles-help)
  406.                (infos)
  407.                (optional force askuser)
  408.                (source "S:crontab")
  409.                (dest "ENVARC:")
  410.                (newname "TimeEvent.prefs")
  411.             )
  412.             (copyfiles
  413.                (prompt #CopyS)
  414.                (help @copyfiles-help)
  415.                (infos)
  416.                (optional force askuser)
  417.                (source "S:crontab")
  418.                (dest "ENV:")
  419.                (newname "TimeEvent.prefs")
  420.             )
  421.             (delete "S:crontab" (confirm) (prompt #AskDelS) (help @delete-help))
  422.          )
  423.       )
  424.    ) 
  425. )
  426.  
  427.  
  428.  
  429. (if 
  430.    (askbool
  431.       (prompt #AskCC)
  432.       (help @askbool-help)
  433.       (default 1)
  434.    )
  435.    (if
  436.       (askbool
  437.          (prompt #AskModify)
  438.          (help @askbool-help)
  439.          (default 0)
  440.       )
  441.       (
  442.          (set CCfile
  443.             (askfile
  444.                (prompt #AskCCfile)
  445.                (help @askfile-help)
  446.                (default "Workbench:WBStartup")
  447.             )
  448.          )
  449.          (tooltype
  450.             (dest CCfile)
  451.             (settooltype "CRONTAB" "ENV:TimeEvent.prefs")
  452.          )
  453.       )
  454.       (message #NoToolType)
  455.    )
  456.    (message #NoCC)
  457. )